<script setup lang="ts">
import { computed } from 'vue';
import useLocale from './hooks/locale';
import useTheme from './hooks/theme';
import enUS from '@arco-design/web-vue/es/locale/lang/en-us';
import zhCN from '@arco-design/web-vue/es/locale/lang/zh-cn';
const { currentLocale } = useLocale();
useTheme()

const locale = computed(() => {
  return {
    'en-US': enUS,
    'zh-CN': zhCN,
  }[currentLocale.value];
});
</script>

<template>
  <a-config-provider
    :locale="locale"
    :global="true"
    :update-at-scroll="true"
    :scroll-to-close="true"
  >
    <router-view></router-view>
  </a-config-provider>
</template>
